#include <iostream>
#include <string>
#include "Reactor.hpp"
#include "Listener.hpp"

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        std::cout << argv[0] << " + port" << std::endl;
        return 1;
    }
    uint16_t port = std::stoi(argv[1]);
    
    std::shared_ptr<Connection> conn = std::make_shared<Listener>(port);
    std::unique_ptr<Reactor> R = std::make_unique<Reactor>();

    R->AddConnection(conn);
    R->Start();
    
    return 0;
}